package com.huluobo.a2109kotlinshopping.net

/**
 *  Created by LC on 2024/1/9.
 *   companion object 伴生对象,类似Java中的静态块static{} ,但是在kotlin中,他的生命周期跟随当前类,其中的内容都是静态的
 *  const val 代表一个常量,对应Java中的public static final
 */
class Const {
    companion object {
        //        const val baseUrl = "https://www.qubaobei.com"
        const val baseUrl = " http://10.161.9.80:7012"
        const val URL_FOOD = "/ios/cf/dish_list.php?stage_id=1&limit=20&page=1"

        //登录接口
        const val URL_LOGIN = "/user/loginjson"

        //用户名参数
        const val PARAM_USERNAME = "username"

        //密码参数
        const val PARAM_PASSWORD = "password"

        //重复密码参数
        const val PARAM_RE_PASSWORD = "repassword"

        //json转换为body参数
        const val MEDIA_PARSE = "application/json;charset=utf-8"

        //注册接口
        const val URL_REGISTER = "/user/register"

        //sp中token的标识
        const val SP_TOKEN = "sp_token"

        //参数中 的token
        const val PARAM_TOKEN = "token"

        //分类id
        const val PARAM_CATEGORY_ID = "category_id"

        //当前页码
        const val PARAM_CURRENT_PAGE = "currentPage"

        //每页长度
        const val PARAM_PAGE_SIZE = "pageSize"

        //首页商品列表
        const val URL_HOME_GOODS_LIST = "/goods/info"

        //SP中保存的用户id
        const val SP_ID = "userId"

        //首页轮播图接口
        const val URL_HOME_BANNER = "/banner/json"

        //首页导航接口
        const val URL_HOME_NAV = "/goods/category"

        //详情接口参数
        const val PARAM_GOODS_ID = "goods_id"

        //详情接口
        const val URL_GOODS_DETAIL = "/goods/detail"

        //购物车接口参数
        const val PARAM_COUNT = "count"

        //添加购物车接口
        const val URL_ADD_TO_CART = "/goods/addCar"

        //查询购物车接口
        const val URL_QUERY_CART = "/goods/selectCar"

        //一二级分类接口
        const val URL_CATEGORY = "/goods/category"

        //三级分类接口
        const val URL_CATEGORY_GOODS_LIST = "/goods/info"

        //删除购物车接口
        const val URL_DELETE_CART = "/goods/deleteCar"

        //删除购物车参数
        const val PARAM_IDS = "ids"

        //收货地址更新接口
        const val URL_UPDATE_ADDRESS = "/user/updateAddress"

        //收货地址更新参数
        const val PARAM_ADDRESS = "address"

        //更新生日接口
        const val URL_BIRTH = "/user/updateBrith"

        //更新生日参数
        const val PARAM_BIRTH = "brith"

        //更新昵称接口
        const val URL_NICKNAME = "/user/updateNickname"

        //更新昵称参数
        const val PARAM_NICKNAME = "nickname"

        //更新性别接口
        const val URL_SEX = "/user/updateSex"

        //更新性别参数
        const val PARAM_SEX = "sex"
    }
}